package net.hn.hnms.biz.cockpit.utils;

public class CalculateUtil {

    public static String getPercent(String total, String count) {
        if (total == null || total.isEmpty() || count == null || count.isEmpty()) {
            return "0";
        }
        double totalNum = Double.parseDouble(total);
        double countNum = Double.parseDouble(count);
        double result = countNum / totalNum * 100;
        return String.format("%.2f", result);
    }
}
